/*
 * @(#)EmailMessageSenderComparator.java
 *
 * Copyright (c) 2004 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */

package com.dcivision.upgrade;

import java.sql.Connection;

import com.dcivision.upgrade.handler.UpgradeHandler;

/**
 * Provide context of upgrade.
 * 
 * @author      Brook.Huang
 * @company     DCIVision Limited
 * @creation    19/04/2007
 * @version     $Revision: 1.8 $
 */
public interface UpgradeContext {

  public Connection getUpgradeConnection();

  public UpgradeRequest getUpgradeRequest();

  public boolean isParticularReportToClient();

  public boolean isUpgradeCompleted();

  public void setUpgradeCompleted(boolean isUpgradeCompleted);

  public void setTopUpgradeHandler(UpgradeHandler topUpgradeHandler);

  public UpgradeHandler getTopUpgradeHandler();

  public boolean isExceptionOccur();

  public void setExceptionOccur(boolean isExceptionOccur);

  public Throwable getException();

  public void setException(Throwable exception);

  public void logReport(CharSequence title, CharSequence detail);

  public UpgradeState getUpgradeState();

  public void setAttribute(String key, Object value);

  public Object getAttribute(String key);
  
  public void release();

  public void commit();
}
